<!DOCTYPE html> 
<html>
  <head>
    <!--META-->
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <meta name="msapplication-tap-highlight" content="no" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">

    <!--CSS-->
    <link rel="shortcut icon" href="img/favicon.ico">
    <link rel="stylesheet" href="API/css/themes/default/jquery.mobile.min.css" />
    <link rel="stylesheet" href="API/css/mycss.css" />
    <link rel="stylesheet" href="css/mycss.css" />

    <!--JS-->
    <script type="text/javascript" src="include/config.js"></script>
    <script type="text/javascript" src="API/js/Jquery/jquery.min.js"></script>
    <script type="text/javascript" src="API/js/JqueryMobile/jquery.mobile.min.js"></script>
    <script type="text/javascript" src="API/js/functionsLib.js"></script>
    <script type="text/javascript" src="js/fonctions.js"></script>

    <script type="text/javascript">
    ///////////////////
    //BLOCK VARIABLE GLOBAL
    ///////////////////
    var id_page = 1;

    ///////////////////
    //BLOCK FONCTIONS EVENEMENTS
    ///////////////////
    /**
     * @name onBodyLoad
     * @desc this function is execute when the page is ready
     * @return {boolean}
     */
    function onBodyLoad(){
        try {
            var myReturn = true;
            
            if($.functionsLib.getUserInfo().profile <= 10){
                $('#div_bt_edit').html('<button onclick="changeMode();" id="bt_changeMode" class="ui-btn ui-btn-inline ui-mini">Edition</button>').trigger('create');
            }
            
            var params = {};
            $.functionsChop.chargerListScenario(params);
            
            return myReturn;
        } catch (er) {
            $.functionsLib.log(0, "ERROR(onBodyLoad):" + er.message);
            return null;
        }
    }
    
    function changeMode() {
        try {
            if(g_mode == 'read'){
                g_mode = 'edit';
                $('#bt_changeMode').buttonMarkup({theme: 'b'});
            }else{
                g_mode = 'read';
                $('#bt_changeMode').buttonMarkup({theme: 'a'});
            }
            
            $.functionsChop.chargerListScenario({});
        } catch (er) {
            $.functionsLib.log(0, "ERROR(ChangeMode):" + er.message);
        }
    }
</script>

</head>
<body onload="onBodyLoad();">

    <!-- page -->
    <div data-role="page" data-title="Titre">

        <!-- /panel -->
        <div data-role="panel" id="mypanel" data-display="overlay" data-position="left">

        </div>
        <!-- /panel -->

        <!-- header -->
        <div data-role="header" data-position="fixed">
            <a href="#mypanel" data-role="button" data-icon="home" data-iconpos="notext">home</a>
            <h1 id="id_titre">titre</h1>
            <a href="javascript:window.location = ('./api_page_contact.html?mili='+$.functionsLib.getMilise());" data-role="button" data-icon="info" data-iconpos="notext">Contact</a>
        </div>
        <!-- /header -->
        
        <!-- navbar -->
        <!-- /navbar -->

        <!-- content -->
        <div data-role="content" id="main_content">
            
            <!-- PopUp -->
            <div data-role="popup" id="popup" class="ui-content">
                <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
                <div>
                    <label id="label_popup"></label>
                    <div id="div_popup"></div>
                </div>
            </div>
            <!-- /PopUp -->
            
            <div id="div_bt_edit"></div>
            
            <div data-role="collapsible" data-collapsed="false" data-mini="true" id="content_page">
                <h4><span id="span_titre">Les sc&eacute;narios</span></h4>
                <div id="div_content">Anomalie code EXXX</div>
            </div>       
        </div>
        <!-- /content -->

        <!-- footer -->
        <div data-role="footer" data-position="fixed">
            <a data-role="button" data-icon="search" data-iconpos="notext" class="ui-btn-left" href="javascript:window.location = ('./api_page_faq.html?mili='+$.functionsLib.getMilise());">FAQ</a>
            <h1 id="id_affichageUser">User</h1>
            <a data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" href="javascript:window.location = ('./api_page_sortie.html?mili='+$.functionsLib.getMilise());">Logout</a>
        </div>
        <!-- /footer -->

    </div>
    <!-- /page -->
</body>
</html>